# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

inherit webapp eutils

DESCRIPTION="shell in cgi/perl."
HOMEPAGE="http://www.gimpster.com/php-shell/"
SRC_URI="'http://binaervarianz.de/downloads.php/redir.html?action=download&mirror=http&file_id=20'"
IUSE="$IUSE"
LICENSE="GPL-2"
KEYWORDS="~x86"
DEPEND="virtual/php"
PF=${P}.tar.gz

src_unpack() {
	unpack ${PF}
}

src_compile() {
	echo "Nothing to compile."
}

src_install() {

	local docs="AUTHORS LICENSE README INSTALL Changelog"
	
	webapp_src_preinst
	
	cd ${WORKDIR}/${P}
	dodoc ${docs}
	for doc in ${docs}; do
		rm -f ${doc}
	done
	cp -R * ${D}${MY_HTDOCSDIR}
	for y in `find . -name '*.php' -print ` ; do
		webapp_runbycgibin php ${MY_HTDOCSDIR}/$y
	done
	for y in `find . -type f -print` ; do
		webapp_serverowned ${MY_HTDOCSDIR}/$y
	done

	webapp_src_install
}

